package com.cy.sys.log.Dao;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import com.cy.sys.pojo.SysConsumer;
import com.cy.sys.pojo.SysUsersinsert;

@Mapper
public interface SysConsumerDao {
	
	//修改密码
	@Update("update sys_users set password=#{newpassword},salt=#{newsalt},modifiedTime=now() where username=#{username}")
	int updatenewpwd(String username,String newpassword,String newsalt);
	//查询当前用户
	SysUsersinsert selectById(String username);
	
	//查询用户所有信息
	List<SysConsumer> findAllUserconsumer(String username);
	//禁用和启用
	@Update("update sys_users set valid=#{valid},modifiedTime=now() where id=#{id}")
	int updatestateById(Integer id,Integer valid);
	//修改用户回显信息
	SysConsumer selectfindById(Integer id);
	//新增自身信息
	int insertfindById(SysUsersinsert sysusers);
	//更新自身信息
	int updateUsersById(SysUsersinsert sysusers);
}
